package com.hsh;

import java.io.File;

public class CommonUtils {
	
	public static void deleteDir(File dir){
		if(dir.isDirectory()){
			String[] children = dir.list();
			for(String str : children){
				File child = new File(dir,str);
				if(child.isDirectory()){
					deleteDir(child);
				}else{
					new File(dir, str).delete();
				}
			}
			dir.delete();
		}
	}
}
